<template>
  <div class="home">
    <img
      alt="Vue logo"
      src="../assets/logo.png"
    >
    <HelloWorld msg="Welcome to Your Vue.js App" />
  </div>
</template>

<script>
// @ is an alias to /src
import HelloWorld from '@/components/HelloWorld.vue'

export default {
  name: 'Home',
  components: {
    HelloWorld
  },
  methods: {
    // async getTodos () {
    //   const res = await this.$http.getTodos('/todos')
    //   console.log(res)
    // }
  },
  async created() {
    // this.getTodos()
    // console.log(this.$http)
    await this.$http.getTodos()
    await this.$http.getPosts()
  }
}
</script>
